package com.lx.demo03;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
//标注这个类是一个切面
@Aspect
@Component
public class AnnotationPointcut {

    @Before("execution(* com.lx.demo01.UserServiceImpl.* (..))")
    public void before(){
        System.out.println("方法执行前-------");
    }
    @After("execution(* com.lx.demo01.UserServiceImpl.* (..))")
    public void after(){
        System.out.println("方法执行后-------");
    }
}
